//
//  ParentViewController.m
//  GoodsManagement
//
//  Created by 车浩 on 2017/3/7.
//  Copyright © 2017年 CheHao. All rights reserved.
//

#import "ParentViewController.h"
#import "MBProgressHUD.h"

@interface ParentViewController ()

@property(nonatomic, strong) MBProgressHUD *hud;

@end

@implementation ParentViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    
    //解决TableView下移64像素
    self.automaticallyAdjustsScrollViewInsets = NO;
    
    
    UIBarButtonItem *leftBtn = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"return"] style:(UIBarButtonItemStylePlain) target:self action:@selector(leftBarButtonItem)];
    self.navigationItem.leftBarButtonItem = leftBtn;
    
    //键盘回收
    UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(keyboardHide:)];
    //设置成NO表示当前控件响应后会传播到其他控件上，默认为YES。
    tapGestureRecognizer.cancelsTouchesInView = NO;
    //将触摸事件添加到当前view
    [self.view addGestureRecognizer:tapGestureRecognizer];
    // Do any additional setup after loading the view.
}
#pragma mark -- LeftBarButtonItem
- (void)leftBarButtonItem{
    
    [self.navigationController popViewControllerAnimated:YES];
}

#pragma mark - 键盘回收,列表回收
- (void)keyboardHide:(UITapGestureRecognizer *)aTap{
    [self.view endEditing:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
